package com.simtop.service;

import com.simtop.common.ServerResponse;
import com.simtop.pojo.userpo.User;
import com.simtop.vo.uservo.UserParamsVo;
import com.simtop.vo.uservo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: liuzhaobo
 * @Description: 用户 Server
 * @DateTime: 2022/9/1 0001 10:41
 * @Params:
 * @Return
 */

public interface UserService {

    /**
     * 导入用户信息
     * @param users
     * @return
     */
    public ServerResponse<Object> importUsers2(List<Object> users);

    ServerResponse<String> register(UserVo userVo);

    ServerResponse<String> generateCheckCode(String email);

    ServerResponse<String> updatePassword(UserVo userVo);

    ServerResponse<String> forgetSendEmailCode(String email);

    List<User> findAll(User user);

    ServerResponse<String> insertBackUser(UserVo userVo);

    ServerResponse<String> deleteByUserId(Integer id);

    ServerResponse<String> updateBackendUser(UserVo userVo);

    List<User> findByParams(UserParamsVo params);

    ServerResponse<Integer> accountUser();

    ServerResponse<User> findById(Integer id);

    int insertIlabUser(UserVo userVo);

    User selectUserByUserId(Integer id);

    User selectUserByLoginName(String loginName);

    /**
     * 获取首页图表信息
     *
     * @return
     */
    ServerResponse<Object> getTopPageCount();


    /**
     * 导入用户信息
     *
     * @param users
     * @return
     */
    public ServerResponse<Object> importUsers(List<Object> users);

    /**
     * 修改用户名
     *
     * @param loginName
     * @param userName
     * @return
     */
    boolean updateUserName(@Param("loginName") String loginName, @Param("userName") String userName);
}
